Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[skip vbump] upversion v0.6.0 #643

Merged
merged 4 commits into from
Feb 4, 2025
Merged

[skip vbump] upversion v0.6.0 #643

merged 4 commits into from
Feb 4, 2025

Conversation

donyunardi
Copy link
Contributor

@donyunardi donyunardi commented Jan 31, 2025

Fixes #633

  • Update NEWS
  • Update DESCRIPTION
  • add eval=requireNamespace("DT", quietly = TRUE) for teal-slice.Rmd

@donyunardi
Copy link
Contributor Author

donyunardi commented Jan 31, 2025

Example runs more than 5 seconds:
https://github.com/insightsengineering/teal.slice/actions/runs/13077862516/job/36494323783#step:8:119

* checking examples ... [24s/24s] OK
Examples with CPU (user + system) or elapsed time > 5s
              user system elapsed
FilteredData 6.563  0.303   6.878

Need to fix this.

Copy link
Contributor

github-actions bot commented Jan 31, 2025

Unit Tests Summary

  1 files   29 suites   29s ⏱️
369 tests 369 ✅ 0 💤 0 ❌
821 runs  821 ✅ 0 💤 0 ❌

Results for commit e76b097.

♻️ This comment has been updated with latest results.

@donyunardi
Copy link
Contributor Author

There are only two examples in FilteredData.R and looking from profvis result, the one that takes the most time is the requireNamespace.

image

Thinking that there's no way around the requireNamespace, I tried to play around with the examples but couldn't get it down to <5 seconds.

Any ideas? @insightsengineering/nest-core-dev

@m7pr
Copy link
Contributor

m7pr commented Feb 3, 2025

For the example, I can not reproduce locally but we can always wrap into \dontRun tag, or \dontTest

@llrs-roche
Copy link
Contributor

MultiAssayExperiment (or MAE in short) is very slow to load, but I think the session should only pay the penalty once, not multiple times.

On my computer I got:

                user system elapsed
   FilteredData 1.03   0.16    7.81

I didn't profile the examples. It seems like there are some areas to improve beyond the calls to loading the package. The high difference between system and elapsed reminds me of some discussion on mailing lists. I don't recall if they were about parallel computation or something like that. I don't think it will block publication on CRAN, but maybe explaining that loading MAE is the most expensive task could help.

@donyunardi
Copy link
Contributor Author

donyunardi commented Feb 3, 2025

@m7pr @llrs-roche Thanks for looking into this, and as discussed, we'll push to CRAN and provide explanation.

@donyunardi
Copy link
Contributor Author

donyunardi commented Feb 3, 2025

Got an error under R-devel.
Here's one example:

  ── Failure ('test-SEFilterStates.R:40:3'): constructor accepts a SummarizedExperiment ──
  Expected `SEFilterStates$new(data = get_test_data(), dataname = "test")` to run without any errors.
  ℹ Actually got a <simpleError> with text:
    Package 'BiocGenerics' version 0.50.0 cannot be unloaded:
     Error in unloadNamespace(package) : namespace 'BiocGenerics' is imported by 'MultiAssayExperiment', 'IRanges', 'GenomicRanges', 'XVector', 'S4Arrays', 'SparseArray', 'DelayedArray', 'GenomeInfoDb', 'S4Vectors', 'Biobase', 'SummarizedExperiment' so cannot be unloaded
Full Failed tests

https://win-builder.r-project.org/qmU6ocnFl9eh/00check.log

══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-SEFilterStates.R:40:3'): constructor accepts a SummarizedExperiment ──
  Expected `SEFilterStates$new(data = get_test_data(), dataname = "test")` to run without any errors.Actually got a <simpleError> with text:
    Package 'BiocGenerics' version 0.50.0 cannot be unloaded:
     Error in unloadNamespace(package) : namespace 'BiocGenerics' is imported by 'MultiAssayExperiment', 'IRanges', 'GenomicRanges', 'XVector', 'S4Arrays', 'SparseArray', 'DelayedArray', 'GenomeInfoDb', 'S4Vectors', 'Biobase', 'SummarizedExperiment' so cannot be unloaded
    
  ── Error ('test-SEFilterStates.R:50:3'): set_filter_state only accepts `teal_slices` ──
  Error in `value[[3L]](cond)`: Package 'BiocGenerics' version 0.50.0 cannot be unloaded:
   Error in unloadNamespace(package) : namespace 'BiocGenerics' is imported by 'MultiAssayExperiment', 'IRanges', 'GenomicRanges', 'XVector', 'S4Arrays', 'SparseArray', 'DelayedArray', 'GenomeInfoDb', 'S4Vectors', 'Biobase', 'SummarizedExperiment' so cannot be unloaded
  
  Backtrace:1. ├─SEFilterStates$new(data = get_test_data(), dataname = "test") at test-SEFilterStates.R:50:3
    2. │ └─teal.slice (local) initialize(...)
    3. │   └─checkmate::assert_class(data, "SummarizedExperiment")
    4. │     └─checkmate::checkClass(x, classes, ordered, null.ok)
    5. └─teal.slice (local) get_test_data()
    6.   └─base::library(SummarizedExperiment) at test-SEFilterStates.R:2:3
    7.     └─base::.getRequiredPackages2(...)
    8.       └─base::library(...)
    9.         └─base::.getRequiredPackages2(...)
   10.           └─base::library(...)
   11.             └─base::tryCatch(...)
   12.               └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   13.                 └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   14.                   └─value[[3L]](cond)
  ── Error ('test-SEFilterStates.R:61:3'): set_filter_state arg -  ───────────────
  Error in `value[[3L]](cond)`: Package 'BiocGenerics' version 0.50.0 cannot be unloaded:
   Error in unloadNamespace(package) : namespace 'BiocGenerics' is imported by 'MultiAssayExperiment', 'IRanges', 'GenomicRanges', 'XVector', 'S4Arrays', 'SparseArray', 'DelayedArray', 'GenomeInfoDb', 'S4Vectors', 'Biobase', 'SummarizedExperiment' so cannot be unloaded
  
  Backtrace:1. ├─SEFilterStates$new(data = get_test_data(), dataname = "test") at test-SEFilterStates.R:61:3
    2. │ └─teal.slice (local) initialize(...)
    3. │   └─checkmate::assert_class(data, "SummarizedExperiment")
    4. │     └─checkmate::checkClass(x, classes, ordered, null.ok)
    5. └─teal.slice (local) get_test_data()
    6.   └─base::library(SummarizedExperiment) at test-SEFilterStates.R:2:3
    7.     └─base::.getRequiredPackages2(...)
    8.       └─base::library(...)
    9.         └─base::.getRequiredPackages2(...)
   10.           └─base::library(...)
   11.             └─base::tryCatch(...)
   12.               └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   13.                 └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   14.                   └─value[[3L]](cond)
  ── Error ('test-SEFilterStates.R:76:3'): get_call returns executable subset call  ──
  Error in `value[[3L]](cond)`: Package 'BiocGenerics' version 0.50.0 cannot be unloaded:
   Error in unloadNamespace(package) : namespace 'BiocGenerics' is imported by 'MultiAssayExperiment', 'IRanges', 'GenomicRanges', 'XVector', 'S4Arrays', 'SparseArray', 'DelayedArray', 'GenomeInfoDb', 'S4Vectors', 'Biobase', 'SummarizedExperiment' so cannot be unloaded
  
  Backtrace:1. └─teal.slice (local) get_test_data() at test-SEFilterStates.R:76:3
    2.   └─base::library(SummarizedExperiment) at test-SEFilterStates.R:2:3
    3.     └─base::.getRequiredPackages2(...)
    4.       └─base::library(...)
    5.         └─base::.getRequiredPackages2(...)
    6.           └─base::library(...)
    7.             └─base::tryCatch(...)
    8.               └─base (local) tryCatchList(expr, classes, parentenv, handlers)
    9.                 └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   10.                   └─value[[3L]](cond)
  ── Error ('test-SEFilterStates.R:104:3'): ui_add returns a message inside a div when data has no rows or no columns ──
  Error in `value[[3L]](cond)`: Package 'BiocGenerics' version 0.50.0 cannot be unloaded:
   Error in unloadNamespace(package) : namespace 'BiocGenerics' is imported by 'MultiAssayExperiment', 'IRanges', 'GenomicRanges', 'XVector', 'S4Arrays', 'SparseArray', 'DelayedArray', 'GenomeInfoDb', 'S4Vectors', 'Biobase', 'SummarizedExperiment' so cannot be unloaded
  
  Backtrace:1. ├─SEFilterStates$new(data = get_test_data(TRUE)[[1]], dataname = "test") at test-SEFilterStates.R:104:3
    2. │ └─teal.slice (local) initialize(...)
    3. │   └─checkmate::assert_class(data, "SummarizedExperiment")
    4. │     └─checkmate::checkClass(x, classes, ordered, null.ok)
    5. └─teal.slice (local) get_test_data(TRUE)
    6.   └─base::library(SummarizedExperiment) at test-SEFilterStates.R:2:3
    7.     └─base::.getRequiredPackages2(...)
    8.       └─base::library(...)
    9.         └─base::.getRequiredPackages2(...)
   10.           └─base::library(...)
   11.             └─base::tryCatch(...)
   12.               └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   13.                 └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   14.                   └─value[[3L]](cond)
  
  [ FAIL 5 | WARN 0 | SKIP 0 | PASS 807 ]
  Error: Test failures
  Execution halted

BiocGenerics can't be unloaded because other packages depend on it during testing. Strangely, this issue only occurs in R Under Development (R-devel) but not in R-released or R-oldrel. This may be related to how Bioconductor packages are managed in R-devel.

The worst-case scenario is skipping the test, but I’d like to investigate further and provide comments in the submission if possible.

@donyunardi
Copy link
Contributor Author

Out of curiosity, I re-upload the package again to the win-builder and this time everything passed with flying colors.

Package submitted to CRAN and I put these links in the comment.
Awaiting feedback.

@donyunardi
Copy link
Contributor Author

Made it to CRAN
#633 (comment)

Copy link

@crazycatandy crazycatandy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewd

@donyunardi donyunardi merged commit 6b8b80c into main Feb 4, 2025
69 checks passed
@donyunardi donyunardi deleted the release-candidate-v0.6.0 branch February 4, 2025 00:00
@github-actions github-actions bot locked and limited conversation to collaborators Feb 4, 2025
@m7pr
Copy link
Contributor

m7pr commented Feb 4, 2025

@donyunardi those example times are machine dependent, that's why sometimes you get different times on submissions, as they run on various machines

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CRAN Release]: 0.6.0
5 participants